var obj={
    a:1,
    b:2,
}

// 属性可以被遍历
// Object.prototype.c=function(){
//     console.log('c')
// }

// 设置属性不可以被遍历
Object.defineProperty(Object.prototype,'c',{
    value:function(){
        console.log('c')
    },
    writable: true,
    enumerable: false,
    configurable: true
})

for(var key in obj){
    console.log(key);
}

//属性描述符
console.log(Object.getOwnPropertyDescriptor(Object.prototype,'c'));
/**
 * 为什么protptype其他属性不能被遍历
    {
    value: [Function (anonymous)],
    writable: true,
    enumerable: true,//这里的原因
    configurable: true
    }
 */

console.log(++[[]][+[]]+[+[]]);

var a=function(){
    this.b=1;
    this.deleteMe=function(){
        delete this;
    }
};
var c=new a();
c.deleteMe();
console.log(String(c));


var a = {1:'one',2:'two',3:'three'};
    var b = Object.keys(a);